package objects;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;

import mainPackage.CollisionMap;
import mainPackage.GameTest;

public class Map {
	Square[] squares;
	Dimension size;
	
	public Map(Dimension size, CollisionMap collisionMap){
		this.size = size;
		squares = new Square[5];
		for (int i = 0; i < squares.length; i++) {
			int x = (int)(Math.random()*size.width);
			int y = (int)(Math.random()*size.height);
			squares[i] = new Square(x, y, (int)(Math.random()*(size.width-x)), (int)(Math.random()*(size.height-y)), Color.black);
			collisionMap.addCollisionBox(squares[i]);
		}
	}
	
	public Graphics2D paint(Graphics2D g){
		for (int i = 0; i < squares.length; i++) {
			g = squares[i].paint(g);
		}
		return g;
	}
}
